
#! /bin/bash
export LANG=zh_CN.UTF-8
PRESTO_HOME=/export/server/presto/bin/presto


${PRESTO_HOME} --catalog hive --server 192.168.88.80:8090 --execute "



insert into hive.edu_rpt.school_num
select
    c_day,
    c_month ,
    c_year,
    orgin_type ,
    itcast_school_id ,
    itcast_school_name ,
     itcast_subject_id ,
    itcast_subject_name ,
    r_num_total ,
    s_num_total ,
    live_num_total ,
    r_cnt_total
from dm.sq_dm_cul_day_cnt
where  itcast_school_name !='未知' or itcast_subject_name !='未知';

insert into hive.edu_rpt.origin_num
select
    c_day,
    c_month,
    c_year ,
    orgin_type ,
    origin_channel,
    tdepart_id ,
    tdepart_name ,
    r_num_total ,
    s_num_total ,
    live_num_total ,
    r_cnt_total
from dm.sq_dm_cul_day_cnt
where orgin_type  is not null;"